Skip to content

Conversation

@arnested
Copy link
Owner

Potential fix for https://github.com/arnested/go-version-action/security/code-scanning/4

To resolve the issue, you should explicitly add a permissions block to the workflow YAML file defining the minimum required permissions. For linting workflows such as this, only contents: read is needed, since the jobs only read files for linting and do not modify repository contents, interact with issues, or comment on pull requests. The permissions block should be added at the workflow root (top-level, just under name or on), so it applies to all jobs unless a job-specific override is needed.
Edit .github/workflows/lint.yml:

  • Add the following block directly after the name: Lint (line 2) or after the on: pull_request (line 3):
    permissions:
      contents: read

No new methods, imports, or package dependencies are required.


Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@arnested arnested marked this pull request as ready for review August 23, 2025 20:31
@arnested arnested merged commit 7abf8e1 into main Aug 23, 2025
12 checks passed
@arnested arnested deleted the alert-autofix-4 branch August 23, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants